use axum::Json;
use serde::Serialize;
use std::collections::HashMap;

#[derive(Debug, Serialize)]
pub struct TrafficStatsResponse {
    pub users: HashMap<String, UserTrafficStats>,
    pub total_tx: u64,
    pub total_rx: u64,
}

#[derive(Debug, Serialize)]
pub struct UserTrafficStats {
    pub tx: u64,
    pub rx: u64,
    pub online: bool,
    pub connections: u32,
}

pub async fn get_traffic_stats() -> Json<TrafficStatsResponse> {
    // TODO: Get from actual traffic stats
    Json(TrafficStatsResponse {
        users: HashMap::new(),
        total_tx: 0,
        total_rx: 0,
    })
}
